package team.archai.nexus.boot.web.service;

import team.archai.nexus.boot.auth.entity.JwtUser;
import team.archai.nexus.boot.auth.exception.AuthException;

/**
 * @Description: 认证接口
 * @Param:
 * @return:
 * @Author: lishibin
 * @Date: 7/11/2020
 */
public interface AuthService<T extends JwtUser> {


    /**
     * 通过用户名密码认证
     *
     * @param username 用户名
     * @param password 密码
     * @return 认证成功实体
     * @throws AuthException 认证异常
     * @author: lishibin
     */
    T loadUserByNameAndPassword(String username, String password) throws AuthException;
}
